package user

import (
	"github.com/gin-gonic/gin"
)

type User struct {
	UserName string `json:"userName"`
	Password string `json:"password"`
}

func CreateUser(c *gin.Context) {

	var user User
	c.BindJSON(&user)
	c.JSON(200, gin.H{
		"code": "200",
		"msg":  "注册成功",
		"data": user,
	})
}

func Login(c *gin.Context) {
	var user User
	c.BindJSON(&user)
	c.JSON(200, gin.H{
		"msg": "登陆成功",
	})
}

func SetUser(c *gin.Context) {
	var user User
	c.BindJSON(&user)
	c.JSON(200, gin.H{
		"msg": "修改成功",
	})
}

func DelUser(c *gin.Context) {
	var user User
	c.BindJSON(&user)
	c.JSON(200, gin.H{
		"msg": "删除成功",
	})
}
